<template>
  <div class="anime-loading-container">
    <!-- 转圈圈 -->
    <div class="anime-spinner"></div>
    <p class="anime-loading-text">加载中... (≧∇≦)ﾉ</p>
  </div>
</template>

<script setup>
// 可以接收自定义文案
defineProps({
  text: {
    type: String,
    default: "加载中... (≧∇≦)ﾉ",
  },
});
</script>

<style scoped>
.anime-loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100vh;
  background: rgba(255, 255, 255, 0.9);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
}

/* 二次元风格转圈圈动画 */
.anime-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid #ff9ff3; /* 粉色边框 */
  border-top: 4px solid #feca57; /* 黄色顶部 */
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.anime-loading-text {
  margin-top: 20px;
  font-family: "Arial", sans-serif;
  color: #ff6b6b;
  font-weight: bold;
  font-size: 1.2rem;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}
</style>
